翻訳と辞書
Words near each other
・ "O" Is for Outlaw
・ "O"-Jung.Ban.Hap.
・ "Ode-to-Napoleon" hexachord
・ "Oh Yeah!" Live
・ "Our Contemporary" regional art exhibition (Leningrad, 1975)
・ "P" Is for Peril
・ "Pimpernel" Smith
・ "Polish death camp" controversy
・ "Pro knigi" ("About books")
・ "Prosopa" Greek Television Awards
・ "Pussy Cats" Starring the Walkmen
・ "Q" Is for Quarry
・ "R" Is for Ricochet
・ "R" The King (2016 film)
・ "Rags" Ragland
・ ! (album)
・ ! (disambiguation)
・ !!
・ !!!
・ !!! (album)
・ !!Destroy-Oh-Boy!!
・ !Action Pact!
・ !Arriba! La Pachanga
・ !Hero
・ !Hero (album)
・ !Kung language
・ !Oka Tokat
・ !PAUS3
・ !T.O.O.H.!
・ !Women Art Revolution


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Kahan summation : ウィキペディア英語版
Kahan summation algorithm
In numerical analysis, the Kahan summation algorithm (also known as compensated summation 〔Strictly, there exist other variants of compensated summation as well: see 〕) significantly reduces the numerical error in the total obtained by adding a sequence of finite precision floating point numbers, compared to the obvious approach. This is done by keeping a separate ''running compensation'' (a variable to accumulate small errors).
In particular, simply summing ''n'' numbers in sequence has a worst-case error that grows proportional to ''n'', and a root mean square error that grows as \sqrt for random inputs (the roundoff errors form a random walk). With compensated summation, the worst-case error bound is independent of ''n'', so a large number of values can be summed with an error that only depends on the floating-point precision.〔
The algorithm is attributed to William Kahan.〔
〕 Similar, earlier techniques are, for example, Bresenham's line algorithm, keeping track of the accumulated error in integer operations (although first documented around the same time〔Jack E. Bresenham, ("Algorithm for computer control of a digital plotter" ), ''IBM Systems Journal'', Vol. 4, No.1, January 1965, pp. 25–30〕) and the Delta-sigma modulation〔H. Inose, Y. Yasuda, J. Murakami, "A Telemetering System by Code Manipulation – ΔΣ Modulation," IRE Trans on Space Electronics and Telemetry, Sep. 1962, pp. 204–209.〕 (integrating, not just summing the error).
==The algorithm==
In pseudocode, the algorithm is:
function KahanSum(input)
var sum = 0.0
var y,t // Temporary values.
var c = 0.0 // A running compensation for lost low-order bits.
for i = 1 to input.length do
y = input() - c // So far, so good: ''c'' is zero.
t = sum + y // Alas, ''sum'' is big, ''y'' small, so low-order digits of ''y'' are lost.
c = (t - sum) - y // ''(t - sum)'' recovers the high-order part of ''y''; subtracting ''y'' recovers -(low part of ''y'')
sum = t // Algebraically, ''c'' should always be zero. Beware overly-aggressive optimizing compilers!
next i // Next time around, the lost low part will be added to ''y'' in a fresh attempt.
return sum

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Kahan summation algorithm」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.